﻿using Lhz.Common.Service;
using Lhz.Data.Linq.Nh;
using Lhz.Sc.Business;
using Lhz.Sc.Interface;
using System;
using System.Collections.Generic;

namespace Lhz.Sc.Service
{
    public class ServiceService : EntityService<ServiceProxy, Guid, Entity.Database.Service>, IServiceService
    {
        public ServiceService() : base(new ServiceProxy())
        {

        }

        public List<Entity.Database.Service> QueryByApplicationGuid(Guid applicationGuid, string[] paths)
        {
            return entityProxy.QueryByApplicationGuid(applicationGuid).LoadByPathsAndClearProxyAndRestoreProxyData(paths);
        }

        public List<Entity.Database.Service> QueryByUserGuid(Guid userGuid, string[] paths)
        {
            return entityProxy.QueryByUserGuid(userGuid).LoadByPathsAndClearProxyAndRestoreProxyData(paths);
        }
    }
}
